
//
//  GDFMomentTableViewCell.m
//  GlobalDeliciousFood
//
//  Created by 赵洁 on 16/1/11.
//  Copyright © 2016年 com.mjykj.www. All rights reserved.
//

#import "GDFMomentTableViewCell.h"
#define kgap 10
@implementation GDFMomentTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _leftImage = [[UIImageView alloc]initWithFrame:CGRectMake(kgap, kgap, 80, 80)];
        _leftImage.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_leftImage];
        
        _nameLable = [[UILabel alloc]initWithFrame:CGRectMake(_leftImage.right+kgap, _leftImage.top+kgap*2, kScreenWidth-200, 30)];
        _nameLable.numberOfLines = 0;
        _nameLable.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_nameLable];
        
        _partLable = [[UILabel alloc]initWithFrame:CGRectMake(_nameLable.right+kgap, _nameLable.top, _nameLable.width/2, _nameLable.height)];
        _partLable.numberOfLines = 0;
        _partLable.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_partLable];
    
    }
    return self;
}

- (void)setModel:(GDFMoentModle *)model
{
    _model = model;
    [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.cover]];
    _nameLable.text = model.title;
    _partLable.text = [NSString stringWithFormat:@"%@人参加",model.peoplenum];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
